package com.toivan.mt.model;

import android.content.Context;
import android.graphics.drawable.Drawable;


import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.StringRes;

import com.toivan.mt.R;

public enum MtFilter {
    NO_FILTER(R.string.none, R.string.name_none, R.drawable.mt_nobeautyfilter_icon),
    CHUNZHEN(R.string.chunzhen, R.string.name_chunzhen, R.drawable.mt_chunzhen_icon),
    WHITE(R.string.white, R.string.name_white, R.drawable.mt_white_icon),
    QINGXIN(R.string.qingxin, R.string.name_qingxin, R.drawable.mt_qingxin_icon),
    ROMANTIC(R.string.romantic, R.string.name_romantic, R.drawable.mt_langman_icon),
    RIXI(R.string.rixi, R.string.name_rixi, R.drawable.mt_rixi_icon),
    QINGLIANG(R.string.qingliang, R.string.name_qingliang, R.drawable.mt_qingliang_icon),
    BAILAN(R.string.bailan, R.string.name_bailan, R.drawable.mt_bailan_icon),
    LANDIAO(R.string.landiao, R.string.name_landiao, R.drawable.mt_landiao_icon),
    CHAOTUO(R.string.chaotuo, R.string.name_chaotuo, R.drawable.mt_chaotuo_icon),
    FENNEN(R.string.fennen, R.string.name_fennen, R.drawable.mt_fennen_icon),
    STANDARD(R.string.standard_filter, R.string.name_standard_filter, R.drawable.mt_biaozhun_icon),
    HUAIJIU(R.string.huaijiu, R.string.name_huaijiu, R.drawable.mt_huaijiu_icon),
    WEIMEI(R.string.weimei, R.string.name_weimei, R.drawable.mt_weimei_icon),
    XIANGFEN(R.string.xiangfen, R.string.name_xiangfen, R.drawable.mt_xiangfen_icon),
    YINGHONG(R.string.yinghong, R.string.name_yinghong, R.drawable.mt_yinghong_icon),
    YUANQI(R.string.yuanqi, R.string.name_yuanqi, R.drawable.mt_yuanqi_icon),
    YUNSHANG(R.string.yunshang, R.string.name_yunshang, R.drawable.mt_yunshang_icon);

    private int stringId;
    private int filterNameId;
    private int imageId;

    MtFilter(@StringRes int stringId, @StringRes int filterNameId, @DrawableRes int imageId) {
        this.stringId = stringId;
        this.filterNameId = filterNameId;
        this.imageId = imageId;
    }

    public String getString(@NonNull Context context) {
        return context.getResources().getString(stringId);
    }

    public String getFilterName(@NonNull Context context) {
        return context.getResources().getString(filterNameId);
    }

    public Drawable getImageDrawable(@NonNull Context context) {
        return context.getResources().getDrawable(imageId);
    }
}
